<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:if test="${requestScope.paginate.show}">
    <div class="page">
        <c:if test="${requestScope.paginate.pprev>=0}">
            <c:if test="${requestScope.paginate.pprev>0}">
                <c:set var="pageValue" value="&start=${requestScope.paginate.pprev}"/>
            </c:if>
            <span><a href="${pageScope.path}${pageValue}" title="上一页">&laquo;上一页</a></span>
        </c:if>
        <c:if test="${requestScope.paginate.page > 6}">
            <span>
                <a href="${pageScope.path}">1</a>
                <c:if test="${requestScope.paginate.page > 7}">
                    <cite style="color:#999; margin-left:6px;">...</cite>
                </c:if>
            </span>
        </c:if>
        <c:forEach var="cell" items="${requestScope.paginate.pagelist}">
        	<c:choose>
        		<c:when test="${requestScope.paginate.page == cell.page}">
        			<span class="current">
		                <c:if test="${cell.start==0}"><c:set var="pageValue" value=""/></c:if>
		                <c:if test="${cell.start>0}"><c:set var="pageValue" value="&start=${cell.start}"/></c:if>
		                ${cell.page}
		            </span>
        		</c:when>
        		<c:otherwise>
        			<span>
		                <c:if test="${cell.start==0}"><c:set var="pageValue" value=""/></c:if>
		                <c:if test="${cell.start>0}"><c:set var="pageValue" value="&start=${cell.start}"/></c:if>
		                <a href="${pageScope.path}${pageValue}">${cell.page}</a>
		            </span>
        		</c:otherwise>
        	</c:choose>
            
        </c:forEach>
        <c:if test="${requestScope.paginate.pnext>=0}">
            <span>
                <a href="${pageScope.path}&start=${requestScope.paginate.pnext}" title="下一页">下一页&raquo;</a>
            </span>
        </c:if>
    </div>
</c:if>